*Instructions for generating maps

*1 Copy this do file, along with the following files into the same folder:
*wojew4maps.dta (statistical data for maps)
*wojewodztwa_coords
*wojewodztwa_data

*2. Copy wojewodztwa_maptile.ado to your ado file folder in Stata

*3 Run the commands below to creat individual maps

*Figure 1 Patriot priest shares
maptile redpriests, geography(wojewodztwa) legdec(1) cutvalues(5 6.5 8 9.5 11) twopt(legend(title("Share of Patriot Priests"))) fcolor(Reds)
graph save Graph "C:\maps\patriot_priests.gph"

*Map B1 Migration percentages
maptile migrant_perc, geography(wojewodztwa) legdec(0) cutvalues(10 15 25 50) twopt(legend(title("Percent Migrants"))) fcolor(Reds)
graph save Graph "C:\maps\migrants.gph"

*Map B2 Imperial partitions 
maptile imper_nr, geography(wojewodztwa) cutvalues(1.5 2.5) twopt(legend(lab(2 "Habsburg") lab(3 "Prussia") lab(4 "Russia" )) legend(title("Partition"))) 
graph save Graph "C:\maps\partitions.gph"

*Map B3 Years of independence 
maptile yrs_ind_1797_1939, geography(wojewodztwa) legdec(0) twopt(title("Years of independence (1797-1939)")) fcolor(Greens)
graph save Graph "C:\maps\years_indep.gph"
 